/*
 * @Descripttion: 
 * @version: 
 * @Author: kk
 * @Date: 2020-10-26 11:04:04
 * @LastEditors: kk
 * @LastEditTime: 2020-10-30 11:46:33
 */
import request from '@/utils/request'

export default{
    getAdminList(page,limit,data){
        return request({
            url: `/acl/admin/getAdminList/${page}/${limit}`,
            method: 'post',
            data
        })
    },
    getAdmin(userId){
        return request({
            url: `/acl/admin/getAdmin/${userId}`,
            method: 'get',
        })
    },
    removeAdmin(id){
        return request({
            url: `/acl/admin/removeAdmin/${id}`,
            method: 'post'
        })
    },
    updateStatus(id){
        return request({
            url: `/acl/admin/updateStatus/${id}`,
            method: 'post'
        })
    },
    //分配角色给用户
    assignRoleToAdmin(userId,roleId){
        return request({
            url: `/acl/admin/toAssignRole/${userId}/${roleId}`,
            method: 'post'
        })
    },
    //添加用户
    addAdmin(data){
        return request({
            url: '/acl/admin/addAdmin',
            method: 'post',
            data
        })
    },
    //添加用户
    updateAdmin(data){
        return request({
            url: '/acl/admin/updateAdmin',
            method: 'post',
            data
        })
    },
    

}